<?php
class Admin_Form_AddTour extends Admin_Form_AddArticle {
	public function init() {
		$dataMaper = new M_Tool_DataMapper();

		$title = new Zend_Form_Element_Text('title');
		$enTitle = new Zend_Form_Element_Text('en_title');

		$tbTourCategory = new M_DbTable_TourCategory();
		$tourCategory   = new Zend_Form_Element_Select(
				'tour_category_id',
				array('label'		 => 'Tour category',
					  'required'	 => true,
					  'multiOptions' => $dataMaper->mapKeyValue($tbTourCategory->getList(),'id', 'en_title')));

		$tbTourStyle  = new M_DbTable_TourStyle();
		$tourStyle 	  = new Zend_Form_Element_Select(
				'tour_style_id',
				array('label'		 => 'Trip in style',
					  'required'	 => true,
					  'multiOptions' => $dataMaper->mapKeyValue($tbTourStyle->getList(),'id', 'en_title')));

		$featured 	  = new Zend_Form_Element_Select(
		        'featured',
		        array('label'		 => 'Featured',
		              'required'	 => true,
		              'multiOptions' => array(0 => 'No', 1 => 'Yes')));

		$bestSelling 	  = new Zend_Form_Element_Select(
		        'best_selling',
		        array('label'		 => 'Best selling',
		              'required'	 => true,
		              'multiOptions' => array(0 => 'No', 1 => 'Yes')));

		$specialOffer 	  = new Zend_Form_Element_Select(
		        'special_offer',
		        array('label'		 => 'Promotion',
		              'required'	 => true,
		              'multiOptions' => array(0 => 'No', 1 => 'Yes')));


		$tbCountry  = new M_DbTable_Country();
		$country    = new Zend_Form_Element_Select(
				'country_id',
				array('label'		 => 'Country',
					  'required'	 => true,
					  'multiOptions' => $dataMaper->mapKeyValue($tbCountry->getList(), 'id', 'en_name')));

		$itinerary = new Zend_Form_Element_Textarea(
				'itinerary',
				array('label' 		=> 'Itinerary (Vi)'));

		$enItinerary = new Zend_Form_Element_Textarea(
				'en_itinerary',
				array('label' 		=> 'Itinerary (En)'));

		$description = new Zend_Form_Element_Textarea(
				'description',
				array('label' 		=> 'Description'));

		$thumbnail = new Zend_Form_Element_File(
				'thumbnail',
				array('label' => 'Thumbnail'));

		$notePrice = new Zend_Form_Element_Textarea(
		        'note_price',
		        array('label' 		=> 'Note of price (Vi)'));

		$enNotePrice = new Zend_Form_Element_Textarea(
		        'en_note_price',
		        array('label' 		=> 'Note of price (En)'));


		$overview = new Zend_Form_Element_Textarea(
		        'overview',
		        array('label' 		=> 'Overview (Vi)'));

		$enOverview = new Zend_Form_Element_Textarea(
		        'en_overview',
		        array('label' 		=> 'Overview (En)'));

		$metaKeyWord = new Zend_Form_Element_Textarea(
		        'meta_keyword',
		        array('label' 		=> 'Meta keyword'));

		$metaDescription = new Zend_Form_Element_Textarea(
		        'meta_description',
		        array('label' 		=> 'Meta description'));
		$headerTitle = new Zend_Form_Element_Textarea(
		        'header_title',
		        array('label' 		=> 'Header title'));

		$this->addElement($tourCategory)
			 ->addElement($tourStyle)
// 			 ->addElement($featured)
// 			 ->addElement($bestSelling)
			 ->addElement($specialOffer)
			 ->addElement($country)
			 ->addElement($enTitle)
			 ->addElement($title)
			 ->addElement($thumbnail)
			 ->addElement($notePrice)
			 ->addElement($enNotePrice)
			 ->addElement($overview)
			 ->addElement($enOverview)
			 ->addElement($itinerary)
			 ->addElement($enItinerary)
			 ->addElement($metaKeyWord)
			 ->addElement($metaDescription)
			 ->addElement($headerTitle);

		parent::init();

		$this->setLegend('Add New Tour');
		$this->addActionGroup()
			 ->makeup();
	}
}